import {timeoutAsync2} from './src/js/fun/timeoute';
// 添加promise.finally方法
// import finally from "./src/js/fun/promise.finally"

import Currency from './src/js/class/currency'
import Time from './src/js/class/cddTime/refactor.time'
import {deepClone} from './src/js/object/deepClone'
import {limitText, sortObj, parseTime, title} from './src/js/lib/lib'
import htmlEscape from './src/js/lib/dfInject/index'
import {addThrottle, Throttle} from './src/js/fun/threttle/index'
import checkType from './src/js/checkType/index'
import {download, createDom} from './src/js/class/download/index'
import {
  createRandomWords,
  clipFileExts
} from './src/js/fun/generate/randmWords'
import {imageMin,imageMinByUrl} from "./src/js/fun/generate/imageMin"
import wxhttp from './src/js/wx/wxHttp'
import store2 from './src/js/wx/store2'
import {formatMsg, msg as wxMsg} from './src/js/wx/formatMsg'
import {camelToUnderLine, underlineToCamel, copyIt} from './src/js/fun/text/index'
import ArrayToggle from './src/js/fun/ArrayToggle'
import ArrayEqual from './src/js/fun/ArrayEqual'
import replaceText from './src/js/fun/string/instandText'
import hideMobile from './src/js/fun/hideMobile'
import checkWeapp from './src/js/fun/checkWeapp'
import {initToken, getToken} from './src/js/fun/axios/initToken'
import cddValidate from "./src/js/fun/validate/index"
import Duration from "./src/js/class/duration"
import NumberTools from "./src/js/class/numberTools"
import Dictionary from "./src/js/class/dictionary"
import CddStore from "./src/js/class/cddStore/index"

export {timeOut, timeOutAsync, timeout2, timeoutAsync2} from './src/js/fun/timeoute'


export {throttle, c_cover} from './export/fun'
// 分开输出
export {
  CddStore,//localstore存储时效管理
  Dictionary,//字典
  Throttle,//节流阀类
  Duration,//计算时间区间
  NumberTools,//数字相关类
  cddValidate, // 验证和反馈
  initToken, // 获取token，适用于axios设置
  getToken, // 获取token
  checkWeapp, // 检测环境是什么1:h5 2:微信h5 3:微信小程序
  hideMobile, // 对手机号进行加密处理
  ArrayEqual, // 判断两个数组的元素是否一样
  replaceText, // 替换指定字符串中的某些文字为特殊符号，例如电话号码的中间四位数替换
  ArrayToggle, // 对数组的元素进行toggle
  camelToUnderLine, // 驼峰-》下划线
  underlineToCamel, // 下划线-》驼峰
  formatMsg, //微信信息处理
  wxMsg, //微信信息处理
  Time,
  addThrottle, //添加节流阀
  Currency, //汇率计算
  deepClone, //深度复制
  limitText, //依赖lodash，限制文字的长度
  title, //编写window title
  htmlEscape, //依赖lodash
  checkType, //检查类型
  sortObj, //对象排序
  sortObj as sortObjArray, //同上
  parseTime, //解析时间
  download, //无依赖通用下载
  createDom, //创建dom
  createRandomWords, //创建随机唯一文字
  clipFileExts, //截取文件扩展名
  wxhttp, //小程序请求结合promise，使用axios风格的方法
  store2, //小程序store2风格的本地存储
  store2 as wxStore2, //小程序store2风格的本地存储
  copyIt,//浏览器环境复制文字
  imageMin,//压缩图片方法
  imageMinByUrl,//压缩图片方法，返回url
}

//主输出
export default {
  CddStore,//localstore存储时效管理
  Dictionary,//字典
  Throttle,//添加节流阀
  Duration,
  NumberTools,
  cddValidate, // 验证和反馈
  initToken,
  getToken,
  checkWeapp, // 检测环境是什么1:h5 2:微信h5 3:微信小程序
  hideMobile, // 对手机号进行加密处理
  ArrayEqual, // 判断两个数组的元素是否一样
  replaceText, // 替换指定字符串中的某些文字为特殊符号，例如电话号码的中间四位数替换
  ArrayToggle, // 对数组的元素进行toggle
  camelToUnderLine, // 驼峰-》下划线
  underlineToCamel, // 下划线-》驼峰
  formatMsg, //微信信息处理
  wxMsg, //微信信息处理
  store2,
  wxStore2: store2,
  wxhttp,
  download,
  createDom,
  checkType,
  addThrottle,
  Currency,
  Time,
  deepClone,
  limitText,
  htmlEscape,
  sortObj,
  sortObjArray: sortObj,
  title,
  copyIt,//浏览器环境复制文字
  imageMin,//压缩图片方法
  imageMinByUrl,//压缩图片方法，返回url
}
